package com.yuhanginfo.modules.sys.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;


import com.yuhanginfo.common.service.CrudService;
import com.yuhanginfo.modules.sys.entity.StoreWarehouse;
import com.yuhanginfo.modules.sys.dao.StoreWarehouseDao;

/**
 * 门店管理Service
 * @author yangs
 * @version 2017-09-12
 */
@Service
@Transactional(readOnly = true)
public class StoreWarehouseService extends CrudService<StoreWarehouseDao, StoreWarehouse> {
    @Autowired
    private StoreWarehouseDao storeWarehouseDao;
    

	
	@Transactional(readOnly = false)
	public void save(StoreWarehouse storeWarehouse) {
		super.save(storeWarehouse);
	}
	
	@Transactional(readOnly = false)
	public void delete(StoreWarehouse storeWarehouse) {
		super.delete(storeWarehouse);
	}

	public List<StoreWarehouse> selectStoreWarehouseList(StoreWarehouse storeWarehouse) {
		
		return storeWarehouseDao.selectStoreWarehouseList(storeWarehouse);
	}

	public List<StoreWarehouse> selectById(String id) {
		
		return storeWarehouseDao.selectById(id);
	}

	public List<StoreWarehouse> selectByCode(StoreWarehouse warehouse) {
		
		return storeWarehouseDao.selectByCode(warehouse);
	}

	public List<StoreWarehouse> selectStoreWarehouse(String code) {
		
		return storeWarehouseDao.selectStoreWarehouse(code);
	}

	public List<StoreWarehouse> selectUseStoreWarehouse(String buyStoreCode) {
		
		return storeWarehouseDao.selectUseStoreWarehouse(buyStoreCode);
	}
	
}